import os
#设置session所需的SECRET_KEY 每次登陆不一致
# SECRET_KEY = os.urandom(24)
SECRET_KEY = 'fdsfjaskdljklda'


DEBUG = True
#自动加载模板
TEMPLATE_AUTO_RELOAD = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
#数据库连接配置
HOSTNAME = '127.0.0.1'
PORT = '3306'
DATABASE = 'dxbbs_db'
USERNAME = 'root'
PASSWORD = '123456'

DB_URI = 'mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8'.format(USERNAME,PASSWORD,HOSTNAME,PORT,DATABASE)
SQLALCHEMY_DATABASE_URI = DB_URI
#设置一个后台CMS,和前台用户变量，用来保存到g对象中
CMS_USER_ID = 'dx'
FRONT_USER_ID = 'Rabbie'
LOGIN_TIME = ''
#Flask-mail 相关配置
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = '1527507926@qq.com'
MAIL_PASSWORD = 'zaczojaxmedgbaeh'
MAIL_DEFAULT_SENDER = '1527507926@qq.com'


# 阿里大于相关配置，暂时无法使用，使用253短信发送功能
ALIDAYU_APP_KEY = '23709557'
ALIDAYU_APP_SECRET = 'd9e430e0a96e21c92adacb522a905c4b'
ALIDAYU_SIGN_NAME = '小饭桌应用'
ALIDAYU_TEMPLATE_CODE = 'SMS_68465012'


#上传图片配置ueditor
UEDITOR_UPLOAD_PATH = os.path.join(os.path.dirname(__file__),'images')
UEDITOR_UPLOAD_TO_QINIU = False
UEDITOR_QINIU_ACCESS_KEY = ""
UEDITOR_QINIU_SECRET_KEY = ""
UEDITOR_QINIU_BUCKET_NAME = ""
UEDITOR_QINIU_DOMAIN = ""

#配置flask-paginate
PER_NUM = 10

#Celery 相关配置
CELERY_BROKER_BACKEND = 'redis://127.0.0.1:6379/0'
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/0'
